﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////



#pragma once

#include "GcmpGeometryInterface.h"
#include "GbmpDefines.h"
#include "OwnerPtr.h"

namespace gcmp { 



/// \brief     Face索引与路径和轮廓索引的映射关系
class GCMP_GEOMETRY_INTERFACE_EXPORT IFaceToPathProfileIndexMapBase
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IFaceToPathProfileIndexMapBase() {}

    /// \brief 获取底面索引
    ///
    /// \return 底面索引
    virtual std::vector<int> GetBottomFaceIndices()const = 0;

    /// \brief 获取顶面索引
    ///
    /// \return 顶面索引
    virtual std::vector<int> GetTopFaceIndices()const = 0;
};

/// \brief     拉伸体索引与轮廓索引的映射关系
class GCMP_GEOMETRY_INTERFACE_EXPORT IExtrudeFaceToPathProfileIndexMap : public IFaceToPathProfileIndexMapBase
{   
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IExtrudeFaceToPathProfileIndexMap() {}

    /// \brief 根据侧面的索引获取轮廓的索引
    ///
    /// \param faceIndex 侧面的索引
    /// \param profileIndex  轮廓的索引
    /// \return true 成功；false 失败
    virtual bool GetProfileIndexBySideFaceIndex(int sideFaceIndex, int& profileIndex)const = 0;

    /// \brief 获取拉伸体所有侧面索引与轮廓索引的对应关系
    ///
    /// \param sideFaceIndexToProfileIndexMap 所有侧面索引与轮廓索引的对应关系
    /// \return 无
    virtual void GetSideFaceIndexToProfileIndexMap(std::map<int, int>& sideFaceIndexToProfileIndexMap)const = 0;
};

/// \brief     融合体侧面对应的轮廓线的索引
class GCMP_GEOMETRY_INTERFACE_EXPORT IBlendProfileIndices
{
public:
    /// \brief 获取侧面对应的底面PolyCurve索引
    ///
    /// \return PolyCurve索引
    virtual int GetBottomPolyCurveIndex()const = 0;

    /// \brief 获取侧面对应的底面PolyCurve的Curve索引
    ///
    /// \return Curve索引
    virtual int GetBottomCurveIndex()const = 0;

    /// \brief 获取侧面对应的顶面PolyCurve索引
    ///
    /// \return PolyCurve索引
    virtual int GetTopPolyCurveIndex()const = 0;

    /// \brief 获取侧面对应的顶面PolyCurve的Curve索引
    ///
    /// \return Curve索引
    virtual int GetTopCurveIndex()const = 0;

    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IBlendProfileIndices() {}
};

/// \brief     融合体Face索引与轮廓索引的映射关系
class GCMP_GEOMETRY_INTERFACE_EXPORT IBlendFaceToPathProfileIndexMap : public IFaceToPathProfileIndexMapBase
{
public:
    /// \brief 根据侧面的索引获取轮廓的索引
    ///
    /// \param sideFaceIndex 侧面的索引
    /// \return ，如果sideFaceIndex非法，会返回空指针
    virtual const IBlendProfileIndices* GetProfileIndicesBySideFaceIndex(int sideFaceIndex) const = 0;

    /// \brief 获取融合体所有侧面索引与轮廓索引的对应关系
    ///
    /// \param sideFaceIndexToProfileIndicesMap 所有侧面索引与轮廓索引的对应关系
    /// \return 无
    virtual void GetSideFaceIndexToProfileIndicesMap(std::map<int, const IBlendProfileIndices*>& sideFaceIndexToProfileIndicesMap) const = 0;

    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IBlendFaceToPathProfileIndexMap() {}
};

/// \brief     扫略体某个侧面对应截面的索引
class GCMP_GEOMETRY_INTERFACE_EXPORT ISweepIndice
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~ISweepIndice() {}

    /// \brief 获取路径索引
    ///
    /// \return 路径索引
    virtual std::vector<int> GetPathIndice()const = 0;

    /// \brief 获取某个截面的PolyCurve索引
    ///
    /// \return PolyCurve索引
    virtual int GetPolyCurveIndex()const = 0;

    /// \brief 获取某个PolyCurve的Curve索引
    ///
    /// \return Curve索引
    virtual int GetCurveIndex()const = 0;

};

/// \brief     扫略体侧面索引与路径和轮廓索引的映射关系
class GCMP_GEOMETRY_INTERFACE_EXPORT ISweepFaceToPathProfileIndexMap : public IFaceToPathProfileIndexMapBase
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~ISweepFaceToPathProfileIndexMap() {}

    /// \brief 根据侧面的索引获取路径和轮廓的索引
    ///
    /// \param sideFaceIndex 侧面的索引
    /// \param sweepIndice  路径和轮廓的索引
    /// \return 扫略路径和轮廓索引
    virtual const ISweepIndice* GetPathIndexAndProfileIndexBySideFaceIndex(int sideFaceIndex)const = 0;

    /// \brief 获取扫略体所有侧面索引与轮廓索引的对应关系
    ///
    /// \param sideFaceIndexToPathProfileIndexMap 所有侧面索引与轮廓索引的对应关系
    /// \return 无
    virtual void GetSideFaceIndexToPathProfileIndexMap(std::map<int, const ISweepIndice*>& sideFaceIndexToPathProfileIndexMap)const = 0;
};

/// \brief     多截面放样体单个截面的索引
class GCMP_GEOMETRY_INTERFACE_EXPORT IMultiSectionLoftIndiceItem
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IMultiSectionLoftIndiceItem() {}

    /// \brief 获取截面索引
    ///
    /// \return 截面索引
    virtual int GetSectionIndex()const = 0;

    /// \brief 获取某个截面的PolyCurve索引
    ///
    /// \return PolyCurve索引
    virtual int GetPolyCurveIndex()const = 0;

    /// \brief 获取某个PolyCurve的Curve索引
    ///
    /// \return Curve索引
    virtual int GetCurveIndex()const = 0;
};

/// \brief     多截面放样体某个侧面对应多个截面的索引
class GCMP_GEOMETRY_INTERFACE_EXPORT IMultiSectionLoftIndice
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IMultiSectionLoftIndice() {}

    /// \brief 获取某个侧面对应多个截面的索引
    ///
    /// \param multiSectionLoftIndice 某个侧面对应多个截面的索引
    /// \return 无
    virtual void GetIndice(std::vector<const IMultiSectionLoftIndiceItem*>& multiSectionLoftIndice)const = 0;
};

/// \brief     多截面放样侧面索引与截面、环和coedge索引的映射关系
class GCMP_GEOMETRY_INTERFACE_EXPORT IMultiSectionLoftFaceToPathProfileIndexMap : public IFaceToPathProfileIndexMapBase
{
public:
    /// \brief 析构函数
    ///
    /// \return 无
    virtual ~IMultiSectionLoftFaceToPathProfileIndexMap(){}

    /// \brief 根据侧面的索引获取某个截面的索引信息
    ///
    /// \param sideFaceIndex  所有截面的索引信息
    /// \return 无
    virtual const IMultiSectionLoftIndice* GetMultiSectionLoftIndiceBySideFaceIndex(int sideFaceIndex)const = 0;

    /// \brief 获取所有侧面对应的截面索引信息
    ///
    /// \param sideFaceIndexToProfileIndexMap  所有侧面对应的截面索引信息
    /// \return 无
    virtual void GetSideFaceIndexToMultiSectionLoftIndiceMap(std::map<int, const IMultiSectionLoftIndice*>& sideFaceIndexToProfileIndexMap)const = 0;
};

}// namespace gcmp
